package com.lb.jwitter.service;

import java.io.Serializable;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import javax.jws.WebService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.lb.jwitter.*;
import com.lb.jwitter.hibernate.*;
import com.lb.jwitter.util.ConditionReport;

@Service("tbl_QLDTTXA_HocVienService")
@Transactional
@WebService(endpointInterface = "com.lb.jwitter.service.Tbl_QLDTTXA_HocVienService")
public class Tbl_QLDTTXA_HocVienServiceImpl implements Tbl_QLDTTXA_HocVienService,Serializable {

   private Log log = LogFactory.getLog(Tbl_QLDTTXA_HocVienServiceImpl.class);
   private static final long serialVersionUID = -8740095022264495229L;

   @Autowired
   @Qualifier("tbl_QLDTTXA_HocVienDAO")
   private Tbl_QLDTTXA_HocVienDAO _tbl_QLDTTXA_HocVienDao;

   @Autowired
   @Qualifier("tbl_QLDTTXA_LopDAO")
   private Tbl_QLDTTXA_LopDAO _tbl_QLDTTXA_LopDao;

   @Autowired
   @Qualifier("tbl_QLDTTXA_DM_NganhDAO")
   private Tbl_QLDTTXA_DM_NganhDAO _tbl_QLDTTXA_DM_NganhDao;

   @Autowired
   @Qualifier("tbl_QLDTTXA_DM_KhoaDAO")
   private Tbl_QLDTTXA_DM_KhoaDAO _tbl_QLDTTXA_DM_KhoaDao;

   @Autowired
   @Qualifier("tbl_QLDTTXA_DM_KhoaHocDAO")
   private Tbl_QLDTTXA_DM_KhoaHocDAO _tbl_QLDTTXA_DM_KhoaHocDao;

   @Autowired
   @Qualifier("tbl_QLDTTXA_DM_ChiNhanhDAO")
   private Tbl_QLDTTXA_DM_ChiNhanhDAO _tbl_QLDTTXA_DM_ChiNhanhDao;

   @Autowired
   @Qualifier("tbl_QLDTTXA_HoSoXetTuyenDAO")
   private Tbl_QLDTTXA_HoSoXetTuyenDAO _tbl_QLDTTXA_HoSoXetTuyenDao;

   @Autowired
   @Qualifier("tbl_QLDTTXA_DM_TrangThaiHocVienDAO")
   private Tbl_QLDTTXA_DM_TrangThaiHocVienDAO _tbl_QLDTTXA_DM_TrangThaiHocVienDao;

   public final List<Tbl_QLDTTXA_HocVien> findAlltbl_QLDTTXA_HocVien(int pageSize, int page){
   List<Tbl_QLDTTXA_HocVien> result = get_tbl_QLDTTXA_HocVienDao().findAll(pageSize, page);
       log.info("Number of user in DB:: "+result.size());
       return result;
   }

   @Transactional(noRollbackFor=IllegalArgumentException.class)
   public final Long createtbl_QLDTTXA_HocVien(Tbl_QLDTTXA_HocVien obj){
       return _tbl_QLDTTXA_HocVienDao.save(obj);
   }

   public final void updatetbl_QLDTTXA_HocVien(Tbl_QLDTTXA_HocVien obj){
       _tbl_QLDTTXA_HocVienDao.update(obj);
   }//end update methode

   public final Tbl_QLDTTXA_HocVien gettbl_QLDTTXA_HocVien (Long id){
       log.info("Try to retrieve the tbl_QLDTTXA_HocVien: "+id);
       return get_tbl_QLDTTXA_HocVienDao().get(id);
   }

   public void deletetbl_QLDTTXA_HocVien(Long id){
       log.info("Try to delete the tbl_QLDTTXA_HocVien by Id : "+ id);
       if(_tbl_QLDTTXA_HocVienDao.exists(id)){
	    _tbl_QLDTTXA_HocVienDao.delete(id);
       } else {
       	throw new IllegalArgumentException("EmployeeId '"+id+"' does not exists");
       }
   }

   public void deleteListtbl_QLDTTXA_HocVien(String[] listId){
       for(String id : listId){
   	    deletetbl_QLDTTXA_HocVien(Long.parseLong(id));
       }
   }

   public List<Tbl_QLDTTXA_HocVien> findtbl_QLDTTXA_HocVienByCondition(List<ConditionReport> cons,int pageSize,int page){ 
       return _tbl_QLDTTXA_HocVienDao.findByCondition(Tbl_QLDTTXA_HocVien.class, cons, pageSize, page); 
   } 
 
   public int counttbl_QLDTTXA_HocVienByCondition(List<ConditionReport> cons){ 
       return _tbl_QLDTTXA_HocVienDao.countByCondition(Tbl_QLDTTXA_HocVien.class, cons); 
   } 
 
   public final Tbl_QLDTTXA_HocVienDAO get_tbl_QLDTTXA_HocVienDao() {
   	return _tbl_QLDTTXA_HocVienDao;
   }
   public final void set_tbl_QLDTTXA_HocVienDao(Tbl_QLDTTXA_HocVienDAO obj) {
   	this._tbl_QLDTTXA_HocVienDao = obj;
   }

   public Tbl_QLDTTXA_LopDAO get_tbl_QLDTTXA_LopDao() {
       return _tbl_QLDTTXA_LopDao;
   }
   public void set_tbl_QLDTTXA_LopDao(Tbl_QLDTTXA_LopDAO _tbl_QLDTTXA_LopDao) {
       this._tbl_QLDTTXA_LopDao = _tbl_QLDTTXA_LopDao;
   }

   public Tbl_QLDTTXA_DM_NganhDAO get_tbl_QLDTTXA_DM_NganhDao() {
       return _tbl_QLDTTXA_DM_NganhDao;
   }
   public void set_tbl_QLDTTXA_DM_NganhDao(Tbl_QLDTTXA_DM_NganhDAO _tbl_QLDTTXA_DM_NganhDao) {
       this._tbl_QLDTTXA_DM_NganhDao = _tbl_QLDTTXA_DM_NganhDao;
   }

   public Tbl_QLDTTXA_DM_KhoaDAO get_tbl_QLDTTXA_DM_KhoaDao() {
       return _tbl_QLDTTXA_DM_KhoaDao;
   }
   public void set_tbl_QLDTTXA_DM_KhoaDao(Tbl_QLDTTXA_DM_KhoaDAO _tbl_QLDTTXA_DM_KhoaDao) {
       this._tbl_QLDTTXA_DM_KhoaDao = _tbl_QLDTTXA_DM_KhoaDao;
   }

   public Tbl_QLDTTXA_DM_KhoaHocDAO get_tbl_QLDTTXA_DM_KhoaHocDao() {
       return _tbl_QLDTTXA_DM_KhoaHocDao;
   }
   public void set_tbl_QLDTTXA_DM_KhoaHocDao(Tbl_QLDTTXA_DM_KhoaHocDAO _tbl_QLDTTXA_DM_KhoaHocDao) {
       this._tbl_QLDTTXA_DM_KhoaHocDao = _tbl_QLDTTXA_DM_KhoaHocDao;
   }

   public Tbl_QLDTTXA_DM_ChiNhanhDAO get_tbl_QLDTTXA_DM_ChiNhanhDao() {
       return _tbl_QLDTTXA_DM_ChiNhanhDao;
   }
   public void set_tbl_QLDTTXA_DM_ChiNhanhDao(Tbl_QLDTTXA_DM_ChiNhanhDAO _tbl_QLDTTXA_DM_ChiNhanhDao) {
       this._tbl_QLDTTXA_DM_ChiNhanhDao = _tbl_QLDTTXA_DM_ChiNhanhDao;
   }

   public Tbl_QLDTTXA_HoSoXetTuyenDAO get_tbl_QLDTTXA_HoSoXetTuyenDao() {
       return _tbl_QLDTTXA_HoSoXetTuyenDao;
   }
   public void set_tbl_QLDTTXA_HoSoXetTuyenDao(Tbl_QLDTTXA_HoSoXetTuyenDAO _tbl_QLDTTXA_HoSoXetTuyenDao) {
       this._tbl_QLDTTXA_HoSoXetTuyenDao = _tbl_QLDTTXA_HoSoXetTuyenDao;
   }

   public Tbl_QLDTTXA_DM_TrangThaiHocVienDAO get_tbl_QLDTTXA_DM_TrangThaiHocVienDao() {
       return _tbl_QLDTTXA_DM_TrangThaiHocVienDao;
   }
   public void set_tbl_QLDTTXA_DM_TrangThaiHocVienDao(Tbl_QLDTTXA_DM_TrangThaiHocVienDAO _tbl_QLDTTXA_DM_TrangThaiHocVienDao) {
       this._tbl_QLDTTXA_DM_TrangThaiHocVienDao = _tbl_QLDTTXA_DM_TrangThaiHocVienDao;
   }

}//endclass

